{% extends "mobile/common/vacation_base.html" %}

{% block title %}选择房型{% endblock %}
{% block css_ex %}
    <!-- build:css(.tmp) css/hotel/hotel_type.css -->
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}mobile/css/hotel/hotel_type.css">
    <!-- endbuild -->
{% endblock %}

{% block app_header %}
    <script>
        {% if not is_breadtrip %}
        // System
        var breadtripBannerTitle = '选择房型';
        var activityName = '选择房型';
        // Display share button or not
        var shrFlag = 0;
        // Display back button or not 
        var goBackFlag = false;
        {% else %} 
        // App 显示底部navigation bar
        var bt_show_bottom_bar = 'YES';

        // System
        var breadtrip_banner_title = '选择房型';
        var activity_name = '选择房型';

        // Display share button or not
        var shr_flag = 0;
        {% endif %}   
    </script>
{% endblock %}

{% block content %} 
<section ng-controller="typeController" ng-cloak>
    <ul class="hotel-type"  ng-if="data.length > 0">
        <li  ng-repeat="t in data" ng-class="{push: isActive(t.id)}" ng-click="tapCtrl($event, t.id, t.room_name)">
            <p>{[t.room_name]}</p>
            <span>房费 ¥ {[t.average_price]}</span><span>税费 ¥ {[ t.tax_and_fee ]}</span>
            <div style="clear:both;"></div>
            <i class="icon-selected"></i>
        </li>
    </ul>
    <div class="icon-empty"  ng-if="data.length == 0">
        <p>暂无合适的房型</p>
    </div>
</section>
{% endblock %}

{# 不加载swipe组件 #}
{% block js_swipe %}{% endblock %}

{# 不加载zepto touch组件 #}
{% block js_touch %}{% endblock %}

{% block js_ex %}
<script type="text/javascript">
    BT.context('hotelId', '{{ hotel_id }}')
    BT.context('checkin_date', '{{checkin_date}}')
    BT.context('checkout_date', '{{checkout_date}}')
    BT.context('back_url', '{{back_url}}')
    var obj = {{products_json|safe}};
</script>
<!-- build:js js/hotel/hotel_type_main.js -->
<script src="{{ STATIC_URL }}mobile/js/common/lib/angular.min.js"></script>
<script src="{{ STATIC_URL }}mobile/js/common/lib/moment.js"></script>
<script src="{{ STATIC_URL }}mobile/js/hotel/hotel_type.js"></script>
<!-- endbuild -->
{% endblock %} 
    
